<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <title>css选择器</title>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        #box {
            background-color: rgb(97, 223, 93);
            text-align: center;
        }

        .container .div1 {
            background-color: aquamarine;
        }

        /* 中间没有空格 */
        .container.div2 {
            background-color: blueviolet;
        }
    </style>
</head>

<body>
    <div id="box">
        <h4>css选择器</h4>
    </div>
    <div class="container">
        container
        <div class="div1">
            div1,后代选择器，只对div1有效
            <code>
                .container .div1{
                    background-color: red;
                }
            </code>
        </div>
    </div>
    <div class="container div2">
        多类选择器
        <div class="div2">
            div2
        </div>
    </div>

</body>

</html>